package com.lh.project.exception;

import com.lh.project.common.ErrorCode;

public class JWTException extends RuntimeException{
    private final int code;


    public JWTException(int code, String message) {
        super(message);
        this.code = code;
    }

    public JWTException(ErrorCode errorCode) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
    }

    public JWTException(ErrorCode errorCode, String message) {
        super(message);
        this.code = errorCode.getCode();
    }

    public int getCode() {
        return code;
    }
}
